<?xml version="1.0" encoding="UTF-8" ?>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html >
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>报表查看器</title>
<%@ include file="../../commons/headfiles-jquery.jsp"%>
<link href="${base}css/apps/report/show.css" media="all"
	rel="stylesheet" type="text/css" />
<script type="text/javascript"
	src="../../scripts/apps/reporter/finished/openone.js"></script>
</head>
<body>
	<div class="navbar navbar-fixed-top navbar-inverse">
		<div class="navbar-inner">
			<div class="container-fluid">
				<div class="nav-collapse">
					<a class="brand" href="#">${year} 年 ${month}月综合生产月报</a> <a
						href="../../reporter/finished/arm-monthly-finished-product-reporter!download?department.id=${department.id}&year=${year}&month=${month}"
						class='btn btn-primary' target="_blank">导出为EXCEL</a>



					<div class="pull-right">
						<button class="btn btn-danger" type="button" onclick="closeMe();">
							<i class="icon-remove-sign"></i>关闭
						</button>
					</div>
				</div>
			</div>
		</div>
	</div>
	<span class="label label-important">选择年月,点击部门显示该部门的综合月报</span>
	<form
	    class="form-inline"
		action="../../reporter/finished/arm-monthly-finished-product-reporter!openone"
		target="_self">
		<input type="hidden" name="department.id" id="todept" /> 年份: <select
			name="year">
			<c:forTokens items="2012,2013" delims="," var="y">

				<option ${param.year==y?'selected':''} value="${y}">${y}</option>

			</c:forTokens>


		</select> 月份: <select name="month">
			<c:forTokens items="1,2,3,4,5,6,7,8,9,10,11,12" delims="," var="m">
				<option ${param.month==m?'selected':''} value="${m}">${m}</option>
			</c:forTokens>

		</select>
	</form>

	<div id="depts"></div>
	<table class="table table-bordered table-hover">
		<caption>${bean.department.name}生产月报</caption>
		<thead>
			<tr>
				<th>序号</th>
				<th>编码</th>
				<th>名称</th>
				<th>单位</th>
				<th>年初</th>
				<th>月初</th>
				<th>本月动工</th>
				<th>动工累计</th>
				<th>本月合格</th>
				<th>合格累计</th>
				<th>本月废品</th>
				<th>废品累计</th>
				<th>本月试销</th>
				<th>试销累计</th>
				<th>结存</th>
				<th>备注</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${bean.armItems}" var="arm" varStatus="vs">
				<tr>
					<td>${vs.index+1}</td>
					<td>${arm.host.code }</td>
					<td>${arm.host.name }</td>
					<td>${arm.host.priceUnit }</td>
					<td>${arm.dataItems['Forwardstore'].atomValue}</td>
					<td>${arm.dataItems['Forwardstore'].accumulateValue}</td>

					<td>${arm.dataItems['Action'].atomValue}</td>
					<td>${arm.dataItems['Action'].accumulateValue}</td>


					<td>${arm.dataItems['Passed'].atomValue}</td>
					<td>${arm.dataItems['Passed'].accumulateValue}</td>

					<td>${arm.dataItems['Wster'].atomValue}</td>
					<td>${arm.dataItems['Waster'].accumulateValue}</td>

					<td>${arm.dataItems['Test'].atomValue}</td>
					<td>${arm.dataItems['Test'].accumulateValue}</td>

					<td>${arm.dataItems['Finalstore'].atomValue}</td>

					<td>${arm.remark}</td>

				</tr>
			</c:forEach>
		</tbody>
		<tfoot>
			<TR>
				<td colspan="16">&copy; 2012</td>
			</TR>
		</tfoot>
	</table>

	<script type="text/javascript">
		var fromid = "${department.id}";
	</script>
</body>
</html>